package me.yushuai.wukong.base.api.request;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import me.yushuai.wukong.common.api.AbstractPageable;

import java.util.Arrays;

/**
 * 分页检索库位组的检索条件
 *
 * @author zhoushuai@189.cn
 * @since 2022-08-31
 */
@Getter
@Setter
@ToString
public class PagingSearchLocGroupRequest extends AbstractPageable {

    /**
     * 库位组编号
     */
    private Long[] groupIds;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        PagingSearchLocGroupRequest that = (PagingSearchLocGroupRequest) o;
        return Arrays.equals(getGroupIds(), that.getGroupIds());
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + Arrays.hashCode(getGroupIds());
        return result;
    }
}
